package com.shop.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;


@Data
@TableName("role")
@ApiModel("Role对象")
public class Role implements Serializable {
    @TableId(value = "id",type = IdType.AUTO)
    @ApiModelProperty(value = "角色id",required = true,example = "0")
    private Integer id;

    @TableField("name")
    @ApiModelProperty("角色名称")
    private String name;

    @TableField("keyword")
    @ApiModelProperty("角色密码")
    private String keyword;

    @TableField("discription")
    @ApiModelProperty("角色描述")
    private String discription;

    @TableField(exist = false)
    @ApiModelProperty("管理员集合")
    private Set<Manager> managers = new HashSet<Manager>(0);

    @TableField(exist = false)
    @ApiModelProperty("权限集合")
    private Set<Permission> permissions = new HashSet<Permission>(0);
}
